<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@	taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<%@ taglib prefix="elf" uri="/WEB-INF/tld/elfunc.tld"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>viewdetails</title>
<style type="text/css">
.div_m {
	margin-left: 30px;
	margin-top: 30px;
	margin-bottom: 30px;
	margin-right: 30px;
	text-align: center;
	width: 1000px;
}

table {
	border: 1px solid #888888;
	border-collapse: collapse;
	width: 460px;
	font-size: 10pt;	
}

.t_main  th {
	font-size: 11pt;
}

table td {
	border: 1px solid #000000;
}
.t1{ width:260px;text-align: left;}
.t2{width:55px;}
.t3{width:55px;}
.t6{width:110px;}
.t4{width:55px;}
.t5{width:55px;}
.tg{text-align: left;}

.tm {
	float: left;
}
.ts {
	float:right;
}
</style>
<script type="text/javascript"
	src="${pageContext.request.contextPath}/javascript/jquery-1.7.1.js"></script>
<script type="text/javascript">
	
</script>
</head>
<body>
<!--<div class="div_m"><form:form modelAttribute="base" action="queryByNo" method="post">
	<fieldset><legend>search</legend> <form:label for="job_No" path="job_No"
		cssErrorClass="error">JOB_NO</form:label> <form:input path="job_No" /> <form:errors
		path="job_No" /> <input type="submit" value="submit" /></fieldset>
</form:form></div>

--><div class="div_m">
<fieldset><!--<legend>result</legend> 
--><c:forEach items="${bases}" var="bs" begin="0" end="${fn:length(bases)-2}" varStatus="var">
<div class="${(var.count+1)%2==1?'ts':'tm'}">
	<table>
		<tr>
			<td class="t1" nowrap>Name: ${bs.name}</td>
			<td class="t2">N/H</td>
			<td class="t3">${bs.nH}</td>
			<td class="t6" colspan=2>DEDUCTION</td>
		</tr>
		<tr>
			<td></td>
			<td>N/P</td>
			<td><fmt:formatNumber value="${bs.nH*bs.payFactor}" pattern="0.00" /></td>
			<td class="t4">NSSA</td>
			<td class="t5">${bs.nSSA}</td>
		</tr>
		<tr>
			<td class="tg">Grade:</td>
			<td>O/H</td>
			<td>${bs.oH}</td>
			<td>PAYE</td>
			<td><fmt:formatNumber
				value="${elf:getPaye(bs.nH,bs.oH,bs.sH,bs.hH,bs.payFactor,bs.bonus,bs.nSSA,bs.nEC,250,0.2)}"
				pattern="0.000" /></td>
		</tr>
		<tr>
			<td></td>
			<td>O/P</td>
			<td><fmt:formatNumber value="${bs.oH*bs.payFactor}" pattern="0.00" /></td>
			<td>AIDS</td>
			<td><fmt:formatNumber
				value="${elf:getPaye(bs.nH,bs.oH,bs.sH,bs.hH,bs.payFactor,bs.bonus,bs.nSSA,bs.nEC,250,0.2)*0.3}"
				pattern="0.000" /></td>
		</tr>
		<tr>
			<td></td>
			<td>S/H</td>
			<td>${bs.sH}</td>
			<td>NEC</td>
			<td>${bs.nEC}</td>
		</tr>
		<tr>
			<td></td>
			<td>S/P</td>
			<td><fmt:formatNumber value="${bs.sH*bs.payFactor}" pattern="0.00" /></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td>Bonus</td>
			<td>${bs.bonus}</td>
			<td>TOTAL</td>
			<td><fmt:formatNumber
				value="${elf:getTotal(bs.nH,bs.oH,bs.sH,bs.hH,bs.payFactor,bs.bonus,bs.nSSA,bs.nEC,0.3,250,0.2)}"
				pattern="0.00" /></td>
		</tr>
		<tr>
			<td></td>
			<td>Gross</td>
			<td><fmt:formatNumber
				value="${elf:getGross(bs.nH,bs.oH,bs.sH,bs.hH,bs.payFactor,bs.bonus)}" pattern="0.000" /></td>
			<td></td>
			<td></td>
		</tr>
		<tr>
			<td></td>
			<td>NET</td>
			<td><fmt:formatNumber
				value="${elf:getGross(bs.nH,bs.oH,bs.sH,bs.hH,bs.payFactor,bs.bonus)-elf:getTotal(bs.nH,bs.oH,bs.sH,bs.hH,bs.payFactor,bs.bonus,bs.nSSA,bs.nEC,0.3,250,0.2)}"
				pattern="0.000" /></td>
			<td></td>
			<td></td>
		</tr>
	</table>
	<br />
</div>
</c:forEach></fieldset>
</div>
</body>
</html>